home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / news / inn1.000 / inn1.4sec-linux-src.tar / inn / lib / checkart.c next >
C/C++ Source or Header  |  1991-11-27  |  431b  |  28 lines

  1. /*  $Revision: 1.1 $
  2. **
  3. */
  4. #include <stdio.h>
  5. #include <sys/types.h>
  6. #include "configdata.h"
  7. #include "nntp.h"
  8. #include "clibrary.h"
  9.  
  10.  
  11. /*
  12. **  See if an article is longer than the NNTP line-length limits.
  13. */
  14. int
  15. NNTPcheckarticle(p)
  16.     register char    *p;
  17. {
  18.     register char    *next;
  19.  
  20.     for (; p && *p; p = next) {
  21.     if ((next = strchr(p, '\n')) == NULL)
  22.         break;
  23.     if (next - p > NNTP_STRLEN)
  24.         return -1;
  25.     }
  26.     return 0;
  27. }
  28.